<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<link rel="stylesheet" type="text/css" href="./public/admin/bootstrap/css/bootstrap.min.css"/>
		<link rel="stylesheet" type="text/css" href="./public/admin/bootstrap/css/bootstrap-responsive.min.css"/>
		<script src="bootstrap/js/bootstrap.min.js" type="text/javascript" charset="utf-8"></script>
		<link rel="stylesheet" type="text/css" href="./public/admin/css/usercenter.css"/>
		<script src="./public/admin/js/area.js" type="text/javascript" charset="utf-8"></script>
		<link rel="stylesheet" type="text/css" href="./public/admin/css/header.css"/>
		<link rel="stylesheet" type="text/css" href="./public/admin/css/footer.css"/>		
		
		<script src="./public/admin/js/jquery-1.7.2.min.js" type="text/javascript" charset="utf-8"></script>
	</head>
	<script type="text/javascript">
		$(function(){
			//初始化方法
			area.init('area');
			//修改的时候默认被选中效果
			area.selected('黑龙江','哈尔滨','道里区');
		})
	</script>
	
	<script type="text/javascript">
		$(function(){
//			alert();
			$('.right_btn').click(function(){
				$(this).css({background:'red'});
				$(this).parents('.address_list').siblings().find('.right_btn').css({background:'#ccc'});
				uaid=$(this).attr('uaid');
				uid=$(this).attr('uid');
//				alert(uaid);
//				alert(uid);
				$.ajax({
					type:"get",
					url:"{{U('getCommon')}}",
					data:{uaid:uaid,uid:uid},
					dataType:'json',
					success:function(phpData){
						alert('设置成功');
					}
				});
				
			})
		})
	</script>
	<body>
		{{include file="VIEW_PATH/Common/header.php"}}
		
		<article>
			<div class="center" >
			{{include file="VIEW_PATH/Common/orderRight.php"}}
				
				<div class="c_adsright">
					<div class="right_adstop"></div>
					
					<div class="main">
						{{foreach from="$addressData" key="$k" value="$v"}}
						<div class="address_list">
							<div class="list_left">
								<span style="font-weight: bold;">收货人：{{$v['consignee']}}</span> 
								<span>收货地址：{{$v['address']}} </span> 
								<span>联系电话：{{$v['phone']}} </span> 
							</div>
							<div class="list_right">
								<span id=""><a href="">修改</a> <a href="">删除</a></span>
								<a href="javascript:;" class="right_btn" uaid={{$v['uaid']}} uid={{$v['user_uid']}} {{if value="$v['common']=='yes'"}}style="background: red;"{{endif}}>
									设为常用地址
								</a>
							</div>							
						</div>
						{{endforeach}}
						<div class="newads_title">
								添加新地址
						</div>
						<form action="{{U('Home/Usercenter/address',array('uid'=>$_GET['uid']))}}" method="post">
						
						<div class="new_address">
							<div class="group">
								<label>收货人姓名：</label>
								<input type="" name="consignee" id="" value="" />
								<span id="">
									请输入收货人姓名
								</span>
							</div>
							<div class="group">
								<label>手机号码：</label>
								<input type="" name="phone" id="" value="" />
								<span id="">
									填写手机号便于接收发货和收货通知
								</span>
							</div>
							<div class="group">
								<label>收货人地址：</label>
								<select name="address[]" id="area1" class="text-input">
									<!--<option value="">选择省份</option>-->
								</select>
								<select name="address[]" id="area2" value="">
									<!--<option value="">选择城市</option>-->
								</select>
								<select name="address[]" id="area3" value="">
									<!--<option value="">选择区县</option>-->
								</select>
								<span id="">
									注:标"*"的为支持货到付款的地区
								</span>
							</div>
							
							<div class="group">
								<label>详细地址：</label>
								<input type="" name="address[]" id="" value="" />
								<span id="">
									请填写详细地址
								</span>
							</div>
							
							<div class="group">
								<label>邮编：</label>
								<input type="" name="code" id="" value="" />
								<span id="">
									请输入收货人所在地邮编号
								</span>
							</div>	
							<input type="hidden" name="uid" id="uid" value="{{$_GET['uid']}}" />
							<input type="submit" id="" name="" value="提交信息" class="btn-b1"/>
						</div>
						</form>						
					</div>
					<div class="kefu">
							 客服电话：400-889-9646 08:00-22:30(周一至周日)
					</div>
				</div>
			</div>
		</article>
		{{include file="VIEW_PATH/Common/footer.php"}}
		
		
	</body>
</html>
